package com.kobe.tokendemo.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 创建 JYQ  on  2018/11/1,15:54
 */
@Configuration
public class WebAppConfig implements WebMvcConfigurer {
    @Override
  public void addInterceptors(InterceptorRegistry registry) {
    //注册自定义拦截器，添加拦截路径和排除拦截路径
    registry.addInterceptor(new InterceptorConfig()).addPathPatterns("/**").excludePathPatterns("/controller");
}


}
